package com.gaojinqi.base.common.service;

import com.gaojinqi.base.common.model.PageReq;
import com.gaojinqi.base.common.model.PageResp;
import com.gaojinqi.base.common.model.BaseTreeEntity;
import org.springframework.data.domain.Sort;

import java.io.Serializable;

/**
 * 通用树结构service接口
 *
 *
 * @author gaojinqi
 * @version 1.0
 * @since 2020年05月08日
 */
public interface BaseTreeService<T extends BaseTreeEntity<ID>, ID extends Serializable>
        extends BaseService<T, ID> {

    /**
     * 路径分隔符
     */
    public static final String ROOT_PARENT_ID = "-1";

    /**
     * 路径分隔符
     */
    public static final String SPLITTER = ",";

    @Override
    void save(T entity);

    @Override
    void update(T entity);

}
